import cv2 as cv
import numpy as np
filePath='../../data/jWithWhiteNoiseLeft.png'
img = cv.imread(filePath,0)
kernel =np.ones((5,5),np.uint8)
opening=cv.morphologyEx(img, cv.MORPH_OPEN, kernel)
cv.imshow('img',img)# cv.imshow('kernel', kernel)
cv.imshow('opening',opening)
cv.waitKey(0)
cv.destroyAllWindows()